package com.maybach.core.ao;

import com.maybach.core.form.partner.PartnerQueryForm;
import com.maybach.core.form.user.UserQueryForm;
import com.maybach.dubbo.api.BizResult;
import com.maybach.dubbo.api.model.EnterpriseCertificateModel;
import com.maybach.dubbo.api.model.PersonCertificateModel;
import com.maybach.dubbo.api.model.ProviderCertificateModel;
import com.maybach.util.query.support.PageResult;
import com.maybach.workflow.common.model.FlowApplyDO;

/**
 * Created by houenxun on 16/1/28.
 */
public interface CertificateAO {

    /**
     * 分页查询用户申请认证申请
     *
     * @return
     */
    PageResult<FlowApplyDO> queryPersonCertificate(UserQueryForm userQueryForm);

    /**
     * 分页查询企业认证申请
     *
     * @param partnerQueryForm
     * @return
     */
    PageResult<FlowApplyDO> queryEnterpriseCertificate(PartnerQueryForm partnerQueryForm);


    /**
     * 分页查询供应商认证申请
     *
     * @param partnerQueryForm
     * @return
     */
    PageResult<FlowApplyDO> queryProviderCertificate(PartnerQueryForm partnerQueryForm);


    /**
     * 查询个人资料申请信息
     *
     * @param userId
     * @return
     */
    PersonCertificateModel queryPersonCertificateByUserId(Long userId);

    /**
     * 查询公司资料申请信息
     *
     * @param userId
     * @return
     */
    EnterpriseCertificateModel queryEnterpriseCertificateByUserId(Long userId);

    /**
     * 查询成为供应商信息
     *
     * @param userId
     * @return
     */
    ProviderCertificateModel queryProviderCertificateByUserId(Long userId);


    /**
     * 提交企业资料审核
     *
     * @param certificateModel
     * @return
     */
    BizResult submitEnterpriseApprove(EnterpriseCertificateModel certificateModel);

    /**
     * 提交个人资料审核
     *
     * @param personInfo
     * @return
     */
    BizResult submitPersionApprove(PersonCertificateModel personInfo);

    /**
     * 申请成为供应商
     *
     * @param userId
     * @return
     */
    BizResult submitProviderApprove(Long userId);

}
